<?php

 header("content-type:text/html;charset=utf-8");
 $dsn='mysql:host=127.0.0.1;dbname=anli';
 try {
       $mod= new PDO($dsn, 'root', 'Winner$123');
       $mod->exec("set names utf8");

 } catch (PDOException $e) {

  exit('数据库连接失败，错误信息：'. $e->getMessage());
  
 }
 

?>